<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="{{ static_url('templates/style.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/reset.css') }}" media="screen" rel="stylesheet" type="text/css" />
<link href="{{ static_url('templates/invalid.css') }}" media="screen" rel="stylesheet" type="text/css" />
<title>无线后台iPad V2.0日常统计</title>
<SCRIPT LANGUAGE="Javascript" SRC="/static/templates/js/jquery-1.7.js"></SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="/static/charts/js/FusionCharts.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
		var strXML = "{%raw xmlStr%}";
		function updateChart(chartSWF){
			//Create another instance of the chart.
			var chart1 = new FusionCharts(chartSWF, "chart1Id", "1200", "300", "0", "0");		   			
			chart1.setDataXML(strXML);
			chart1.render("chart1div");
			$("#chart1div").show();
		}
		function closeChart2(){
			$("#chart1div").slideToggle(2000);	
		}
		function showNote(){
			$("#notediv").show();
		}
		function showHelp(content){
			$("#notediv").html(content)
		}
		var time="{{time}}";
		var type="{{type}}";
		var version="{{version}}";
		$(document).ready(function(){
			$("#time").val(time);
			$("#type").val(type);
			$("#version").val(version);

			$(".main-content tr").mouseover(function(){ //如果鼠标移到class为stripe_tb的表格的tr上时，执行函数
			$(this).addClass("over");}).mouseout(function(){ //给这行添加class值为over，并且当鼠标一出该行时执行函数
			$(this).removeClass("over");}) //移除该行的class
			$(".main-content tr:even").addClass("alt"); //给class为stripe_tb的表格的偶数行添加class值为alt
		});

</SCRIPT>
</head>
<body>
<h3>无线后台iPad V2.0日常统计</h3>

<div id="left-content">
<form name='frmUpdate' action="/client/ipad/daily">
<select id="time" name="time">
	<option value="">按日期</option>
	<option value="201111">2011年11月</option>
	<option value="201112">2011年12月</option>
	<option value="201201">2012年1月</option>
	<option value="201202">2012年2月</option>
</select>
<select id="type" name="type">
	<option value="all">所有数据</option>
	<option value="pv">pv数据</option>
	<option value="uv">uv数据</option>
	<option value="vv">vv数据</option>
	<option value="new_user">日新用户</option>
	<option value="startuv">启动uv</option>
</select>
<select id="version" name="version">
	<option value="v2">版本V2.0~V2.1.3</option>
	<option value="v2.14">版本V2.14</option>
</select>

<input type='submit' value='查询' name='btnPie' />		
</form>
</div>
<div id="right-content">
<form name='frmUpdate'>
图表显示:		
<input type='button' value='柱狀图' onClick="javaScript:updateChart('/static/charts/fcf/FCF_MSColumn3D.swf');" name='btnColumn' />		
<input type='button' value='曲线图' onClick="javaScript:updateChart('/static/charts/fcf/FCF_MSLine.swf');" name='btnLine' />		
<input type='button' value='关闭' onClick="javaScript:closeChart2();" name='closeChart' />		
</form>
</div>
<div id="main-content">
<br/><br/><br/>
<div id="notediv">	
			&nbsp;
</div>
<div id="chart1div">
			&nbsp;
</div>
<script language="JavaScript">					
	//var chart1 = new FusionCharts("/static/charts/fcf/FCF_MSColumn3D.swf", "chart1Id", "1200", "400", "0", "0");
	//chart1.setDataXML(strXML);
	//chart1.render("chart1div");
</script>
<div class="content-box">

<table class="main-content">
<thead>
<tr>
	<th>Date</th>
	{% if  type == 'pv' or type == 'all'%}
	<th>PV<a onclick="showHelp('PV：接口调用次数')"><img src="/static/templates/images/mark.gif" title="PV：接口调用次数" /></a></th>
	{% end %}
	{% if  type == 'uv' or type == 'all'%}
	<th>UV<a onclick="showHelp('UV：用户访问量')"><img src="/static/templates/images/mark.gif" title="UV：用户访问量" /></a></th>
	{% end %}
	{% if  type == 'vv' or type == 'all'%}
	<th>VV<a onclick="showHelp('VV：视频播放量')"><img src="/static/templates/images/mark.gif" title="VV：视频播放量" /></a></th>
	{% end %}
	{% if  type == 'new_user' or type == 'all'%}
	<th>NEW_USER<a onclick="showHelp('NEW_USER：新增用户量')"><img src="/static/templates/images/mark.gif" title="NEW_USER：新增用户量" /></a></th>
	{% end %}
	{% if  type == 'startuv' or type == 'all'%}
	<th>启动UV<a onclick="showHelp('STARTUV：用户启动次数')"><img src="/static/templates/images/mark.gif" title="STARTUV：用户启动次数" /></a></th>
	{% end %}
</tr>
</thead>
<tbody>
{% for i in range(len(pv)) %}
    <tr>
	<td align='center'>{{keys[i]}}</td>
	{% if  type == 'pv' or type == 'all'%}
    <td align='center'>{{pv[keys[i]]}}</td>
    {% end %}
    {% if  type == 'uv' or type == 'all'%}
    <td align='center'>{{uv[keys[i]]}}</td>
    {% end %}
	{% if  type == 'vv' or type == 'all'%}
    <td align='center'>{{vv[keys[i]]}}</td>
    {% end %}
	{% if  type == 'new_user' or type == 'all'%}
    <td align='center'>{{new_user[keys[i]]}}</td>
    {% end %}
    {% if  type == 'startuv' or type == 'all'%}
    <td align='center'>{{startuv[keys[i]]}}</td>
    {% end %}
    </tr>
{% end %}
</tbody>
</table>

</div>
</div>

</body>
</html>
